package com.shlh.saas.entity.facebook;

public class EsFacebookFields {
    // ==================== 基础标识字段 ====================
    public static final String DOC_ID = "_id";
    public static final String MYSQL_ID = "mysql_id";
    public static final String MYSQL_TABLE = "mysql_table";
    public static final String UID = "uid";

    // ==================== 联系信息字段 ====================
    public static final String EMAIL = "email";
    public static final String PHONE_NUMBER = "phone_number";

    // ==================== 个人信息字段 ====================
    public static final String FIRST_NAME = "first_name";
    public static final String LAST_NAME = "last_name";
    public static final String FULL_NAME = "full_name";
    public static final String GENDER = "gender";

    // ==================== 位置信息字段 ====================
    public static final String BIRTH_PLACE = "birth_place";  // 出生地/家乡
    public static final String WORK_PLACE = "work_place";    // 工作地点
    public static final String WORKPLACE_CITY = "workplace_city";  // 工作城市/当前位置

    // ==================== 状态信息字段 ====================
    public static final String MARITAL_STATUS = "marital_status";  // 关系状态

    // ==================== 时间相关字段 ====================
    // 注意：以下字段在当前ES索引中可能不存在，仅为将来扩展预留
    public static final String BIRTH_DATE = "birth_date";    // 出生日期
    public static final String JOIN_DATE = "join_date";      // 入职日期
    public static final String CREATED_AT = "created_at";    // 创建时间（预留）
    public static final String UPDATED_AT = "updated_at";    // 更新时间（预留）

    // ==================== 查询字段数组 ====================
    public static final String[] FIELD_QUERY = {
            DOC_ID, UID, MYSQL_ID, MYSQL_TABLE, PHONE_NUMBER, FIRST_NAME, LAST_NAME, FULL_NAME, GENDER,
            WORK_PLACE, WORKPLACE_CITY, BIRTH_PLACE, MARITAL_STATUS, EMAIL, BIRTH_DATE, JOIN_DATE
    };

    // ==================== 排序相关字段 ====================
    /**
     * 用于排序的主要字段（当前使用 mysql_id 降序实现最新数据在前）
     */
    public static final String SORT_FIELD_PRIMARY = MYSQL_ID;

    /**
     * 排序方向：desc = 降序（最新在前），asc = 升序（最旧在前）
     */
    public static final String SORT_ORDER_NEWEST_FIRST = "desc";
    public static final String SORT_ORDER_OLDEST_FIRST = "asc";
}
